<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="林镭特">
    <title></title>
    <!-- <link href="../bootstrap/css/bootstrap.css" rel="stylesheet"> -->
    <style>
        
    </style>
</head>
<body>
    <!-- 2，用数组创建一个下拉列表。 -->
<script>
    var xiala = document.createElement("select");
    document.body.appendChild(xiala);

    var java=['java','JS','css','html']
    
    for(var i in java){
        var op=document.createElement('option')
        console.log(op);
         op.id=op
         op.innerHTML=java[i]
         op.value=java[i]
        xiala.appendChild(op)
         
    }

</script>
    <!-- <script src="../bootstrap/js/jquery.js"></script>
    <script src="../bootstrap/js/bootstrap.js"></script> -->
</body>
</html>